def print_file_info(file_name):
    f = None
    try:
        f = open(file_name, 'r', encoding='UTF-8')
        print(f.read())
    except Exception as e:
        print("文件不存在", e)
    finally:
        if f:
            f.close()


if __name__ == '__main__':
    print_file_info("abc.txt")

